<template>
  <el-dialog title="详细" :visible.sync="open" width="55%" append-to-body :before-close="cancel">
    <el-form ref="form" :model="form" :rules="rules" label-width="100px">
      <el-row>
        <el-col :span="10">
          <el-form-item label="客户姓名">
            {{form.customerName}}
          </el-form-item>
        </el-col>
        <el-col :span="10" >
          <el-form-item label="电话">{{form.phoneNumber}}</el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="10">
          <el-form-item label="闲鱼账号">
              {{form.fishAccount}}
          </el-form-item>
        </el-col>
        <el-col :span="10" >
          <el-form-item label="免息券类型">
            <dict-tag
              :options="dict.type.mx_type"
              :value="form.mxType"
            >
            </dict-tag>

          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="10" >
          <el-form-item label="订单状态">
            <dict-tag
              :options="dict.type.order_status"
              :value="form.status"
            >
            </dict-tag>
          </el-form-item>
        </el-col>
        <el-col :span="10">
          <el-form-item label="抢券时间">
          {{form.presetTime}}
          </el-form-item>
        </el-col>
      </el-row>
<!--      <el-row>
        <el-col :span="10">
          <el-form-item label="文件">
            {{form.fishAccount}}
          </el-form-item>
        </el-col>
        <el-col :span="10" label="文件">
          {{form.fishAccount}}
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="10">
          <el-form-item label="文件">
            {{form.fishAccount}}
          </el-form-item>
        </el-col>
        <el-col :span="10">
          {{form.fishAccount}}
        </el-col>
      </el-row>-->
    </el-form>
    <div slot="footer" class="flex-center">
<!--      <el-button type="primary" @click="submitForm" :loading="buttonLoading">确认</el-button>-->
      <el-button @click="cancel">关  闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { getToken } from '@/utils/auth'
import { importJinFenData } from '@/api/mx/rebate'
import { getOrder } from '@/api/mx/order'

export default {
  dicts:['order_status','mx_type'],
  name: 'importOrders',
  props:{
    //父页面的打开条件
    open:{
      default:false
    },
    form:{
      default:{}
    },
  },
  data(){
    return{
      headers: {
        Authorization: "Bearer " + getToken(),
      },
      fileList:[],
      uploadUrl: process.env.VUE_APP_BASE_API + "/jd/rebate/order/importIdAndOrderExcel",
      accept:  ".xls, .xlsx",
      // 表单参数

      fileSize: '5M',
      // 表单校验
      rules: {


      },
      buttonLoading: false
    }
  },
  methods:{
    //关闭
    cancel() {
      this.form = {}
      this.$emit('close')
    },
    /** 提交按钮 */
    /* submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          this.buttonLoading = true;
            let obj = {}

            let formData = new FormData();
            //附件
            if (this.fileList.length > 0) {
              let newFileList = {};
              this.form.fileList = [];
              this.fileList.forEach(file => {
                formData.append("fileList", file.raw);
                //this.form.fileList.push(file.raw);
              });
            }
            formData.append("form", JSON.stringify(this.form));
            //获得营业部编号
          importJinFenData(formData).then(res => {
              if (res.code === 200) {
                this.cancel()
                this.$message.success("上传成功");
              }

            }).catch(()=> this.buttonLoading = false).finally(()=> this.buttonLoading = false);
        }
      });
    }, */



  }
}
</script>

<style scoped>

</style>
